home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / o2d011.zip / O2D.INF (.txt) < prev    next >
OS/2 Help File  |  1992-12-06  |  11KB  |  325 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. O2D Syntax ΓòÉΓòÉΓòÉ
  3.  
  4.  
  5.                    Γöî              ΓöÉ Γöî                 ΓöÉ Γöî       ΓöÉ Γöî               ΓöÉ
  6. O2D  Pgm_file_spec Γöé/cwd:path_specΓöé Γöé/env:env_filespecΓöé Γöé/nowaitΓöé Γöétarget_app_optsΓöé
  7.                    Γöö              Γöÿ Γöö                 Γöÿ Γöö       Γöÿ Γöö               Γöÿ
  8.  
  9. Program_file_spec 
  10.           Name of program .EXE file or name of a DOS .BAT batch file. 
  11.  
  12.           If you use the /cwd operand to establish a current working directory, 
  13.           then the program file name may not need to have a fully qualified 
  14.           path included. 
  15.  
  16. /cwd: 
  17.           Current working directory. 
  18.  
  19.           The path_spec value is a path to a directory and may contain a drive 
  20.           letter. 
  21.  
  22. /env: 
  23.           Environment file name. 
  24.  
  25.           This names the ASCII text file containing the DOS settings parameter 
  26.           names and values you want to use in establishing the DOS session. 
  27.           The parameters are used only during the DosStartSession processing to 
  28.           define the new DOS session. 
  29.  
  30. /nowait 
  31.           No WAIT option. 
  32.  
  33.           This tells O2D to create an independent DOS session and not to WAIT 
  34.           for the DOS session to terminate before O2D itself terminates. If the 
  35.           /nowait option is not used, then O2D will create the DOS session and 
  36.           then WAIT for the DOS session to terminate before O2D itself ends and 
  37.           returns control to the command line or to the 
  38.  
  39. target_app_opts 
  40.           Target application operands 
  41.  
  42.           These operands will be passed to the target DOS application, which is 
  43.           either a program or .BAT batch file for use by the target 
  44.           application. 
  45.  
  46.  
  47. ΓòÉΓòÉΓòÉ 2. Examples ΓòÉΓòÉΓòÉ
  48.  
  49. The following examples show some uses of O2D: 
  50.  
  51.  
  52. o2d myapp.exe /cwd:d:\myapp uopt1 uopt2
  53.  
  54. The above will invoke the myapp.exe program as a DOS session, first doing a 
  55. chdir to change the current directory to d Note that this may also change the 
  56. default drive at the same time. O2D passes the operands "uopt1 uopt2" to 
  57. myapp.exe as part of its command line.  No special environment is established 
  58. for myapp.exe. 
  59.  
  60.  
  61. o2d myapp.exe /cwd:d:\myapp /env:myapp.env uopt1 uopt2
  62.  
  63. The above does the same as the preceding example but also tells O2D to read the 
  64. myapp.env file to define DOS session settings used to create the new session. 
  65.  
  66.  
  67. ΓòÉΓòÉΓòÉ 3. Function of O2D ΓòÉΓòÉΓòÉ
  68.  
  69. O2D is an OS/2 session command line utility for use in .CMD batch files and in 
  70. O2D runs in an OS/2 window or FS session and is used to start a DOS application 
  71. session. 
  72.  
  73. You can define DOS session parameters for the new session using the same 
  74. session parameters as you can access through the usual desktop folder method of 
  75. defining DOS applications. O2D extends the functionality of the command line 
  76. environment to provide you with a more useful interface to your DOS 
  77. applications. 
  78.  
  79.  
  80. ΓòÉΓòÉΓòÉ 4. O2D Versus START ΓòÉΓòÉΓòÉ
  81.  
  82. The START command can be used to create a DOS session in both windowed and FS 
  83. modes.  However, START does not wait for the new DOS session to terminate 
  84. before control is returned to the 
  85.  
  86. The START command cannot provide all the DOS session parameters that a folder 
  87. can. 
  88.  
  89. O2D can WAIT for a DOS session to end before control returns to the next 
  90. statement in the .CMD file, or you can have O2D start an independent DOS 
  91. session by using the /nowait command line operand.  O2D also provides support 
  92. for the usual folder DOS session parameters such as DPMI_DOS_API=ENABLED, or 
  93. DOS_STARTUP_DRIVE, which allows you to launch a specially constructed DOS 
  94. session from your OS/2 .CMD files. 
  95.  
  96.  
  97. ΓòÉΓòÉΓòÉ 5. Contents of Environment File ΓòÉΓòÉΓòÉ
  98.  
  99.  Example of ASCII Environment File records:  (shows all keys) Only some of the 
  100. keywords below are usually used: 
  101.  
  102. DOS_BACKGROUND_EXECUTION=ON
  103. DOS_BREAK=OFF
  104. DOS_DEVICE=   /* device.sys filename */
  105. DOS_FCBS=16
  106. DOS_FCBS_KEEP=8
  107. DOS_FILES=20
  108. DOS_HIGH=ON
  109. DOS_LASTDRIVE=J
  110. DOS_RMSIZE=640
  111. DOS_SHELL=D:\OS2\MDOS\COMMAND.COM D:\OS2\MDOS /P
  112. DOS_STARTUP_DRIVE=  /* filespec for VMDISK DOS file */
  113. DOS_UMB=ON
  114. DOS_VERSION=        /* special DOS settings required for app */
  115. DPMI_DOS_API=ENABLED
  116. DPMI_MEMORY_LIMIT=3
  117. DPMI_NETWORK_BUFF_SIZE=8
  118. EMS_FRAME_LOCATION=AUTO
  119. EMS_HIGH_OS_MAP_REGION=32
  120. EMS_LOW_OS_MAP_REGION=384
  121. EMS_MEMORY_LIMIT=2048
  122. HW_NOSOUND=OFF
  123. HW_ROM_TO_RAM=OFF
  124. HW_TIMER=OFF
  125. IDLE_SECONDS=15
  126. IDLE_SENSITIVITY=75
  127. KBD_ALTHOME_BYPASS=OFF
  128. KBD_BUFFER_EXTEND=ON
  129. KBD_CTRL_BYPASS=OFF
  130. KBD_RATE_LOCK=OFF
  131. MEM_EXCLUDE_REGIONS=
  132. MEM_INCLUDE_REGIONS=
  133. MOUSE_EXCLUSIVE_ACCESS=OFF
  134. PRINT_TIMEOUT=15
  135. VIDEO_FASTPASTE=ON
  136. VIDEO_MODE_RESTRICTION=NONE
  137. VIDEO_ONDEMAND_MEMORY=ON
  138. VIDEO_RETRACE_EMULATION=OFF
  139. VIDEO_ROM_EMULATION=OFF
  140. VIDEO_SWITCH_NOTIFICATION=ON
  141. VIDEO_WINDOW_REFRESH=1
  142. XMS_HANDLES=32
  143. XMS_MEMORY_LIMIT=2048
  144. XMS_MINIMUM_HMA=0
  145.  
  146. O2D provides support for the keywords in the DOS SESSION parameters in the 
  147. program folder, thus giving .CMD and REXX programs the same DOS application 
  148. features as provided by the program folder DOS SESSION parameters. 
  149.  
  150.  
  151. ΓòÉΓòÉΓòÉ 6. Sample DOS .BAT File ΓòÉΓòÉΓòÉ
  152.  
  153. You can use a .BAT file instead of referring to a .EXE program file as the 
  154. target of O2D, and have the .BAT batch file do special SET commands and other 
  155. processing needed to establish the DOS environment for the target application. 
  156.  
  157. O2D cannot affect the DOS ENVIRONMENT that is seen by the target application 
  158. program.  Only a .BAT file that executes the target .EXE program can establish 
  159. SET variables for use by the target program, unless you alter the global OS/2 
  160. AUTOEXEC.BAT found in the OS/2 boot drive root directory.  Changing the global 
  161. AUTOEXEC.BAT file will affect all DOS sessions started by folders and from 
  162. command lines. 
  163.  
  164. O2D gives you a more refined way to establish DOS session settings and also use 
  165. .BAT files to establish special PATH and SET values for use by each individual 
  166. DOS application. 
  167.  
  168. The DOS .BAT file contents listed below are used to launch the BorlandC 
  169. compiler from a .CMD REXX program that first tests for the proper dismountable 
  170. disk in a Bernoulli drive before using O2D to start the DOS session with 
  171. BorlandC compiler. 
  172.  
  173.  
  174. PATH=G:\BorlandC\BIN;E:\CSOURCE\BIN;%PATH%
  175. E:
  176. CD \CSOURCE
  177. SET LIB=g:\BorlandC\LIB
  178. SET INCLUDE=E:\CSOURCE\COMMON;E:\CSOURCE;G:\BorlandC\INCLUDE
  179. SET HELP=G:\BorlandC\BIN
  180. LOADHIGH G:\BorlandC\BIN\BC.EXE
  181. EXIT
  182.  
  183. Notice that the SET commands establish the needed PATH, LIB, INCLUDE, and HELP 
  184. values referenced by the compiler. Using O2D in this fashion, you can freely 
  185. create different tailored DOS execution environments for any application. 
  186.  
  187.  
  188. ΓòÉΓòÉΓòÉ 7. REXX .CMD to use .BAT File ΓòÉΓòÉΓòÉ
  189.  
  190. Below is the .CMD file REXX program to test for the proper Bernoulli disk 
  191. mounted and ready for use. 
  192.  
  193. /* REXX BorlandC */
  194. BorlandDrive="G"
  195. ifo="";
  196. ifo=sysdriveinfo(BorlandDrive);
  197. if ifo ="" then do;
  198.    say "Drive" BorlandDrive "is not mounted.";
  199.    say "Please mount Bernoulli disk labelled BorlandC in drive" BorlandDrive;
  200.    say "Press any key to continue.";
  201.    irc=SysGetKey();
  202.    ifo="";
  203.    ifo=sysdriveinfo(BorlandDrive);
  204.    if ifo = "" then do;
  205.       say "Drive" BorlandDrive "is not mounted.";
  206.       say "Abandoning attempt to use BorlandC.";
  207.       exit;
  208.    else say "OK. Continuing.";
  209.    end;
  210. end;
  211. 'D:\OS2\APPS\O2D.EXE BorlandC.BAT /cwd:d:\os2\APPS /env:BorlandC.INI'
  212. exit;
  213.  
  214.  
  215. ΓòÉΓòÉΓòÉ 8. Installation ΓòÉΓòÉΓòÉ
  216.  
  217. You've already unzipped the files, since you're reading this file. 
  218.  
  219. To make it easier for you to display this file, you can define a desktop or 
  220. Information folder object that uses the VIEW program to view this file: 
  221.  
  222.      Program:              VIEW.EXE
  223.      Optional Parameters:  O2D.INF
  224.  
  225. You then open the folder to display the help information, or you can ask O2D to 
  226. do so by issuing the command: 
  227.  
  228.      o2d /?
  229.  
  230. When you are creating a folder for help display, provide the full path to the 
  231. O2D.INF file for the folder unless you've copied the O2D.INF file to one of the 
  232. directories in the BOOKSHELF= path spec.  You can view the BOOKSHELF= list of 
  233. directories by issuing the command: 
  234.  
  235.      SET | MORE
  236.  
  237. Look for the BOOKSHELF= entry and then copy the O2D.INF file to one of the 
  238. directories, usually the \OS2\BOOK one. 
  239.  
  240. To make the use of O2D easier, copy the O2D.EXE file to your \OS2\APPS 
  241. directory, which is usually in the PATH. 
  242.  
  243. To make this program available to your friends, provide them with a copy of the 
  244. original O2D011.ZIP file in addition to any other files you provide in expanded 
  245. form.  The original .ZIP file contains PKZip internal authentication checks 
  246. that the author has purchased to ensure that program files compressed by this 
  247. utility from PkWare, Inc. are not corrupted. PKUNZIP version 1.1 is needed to 
  248. unzip the files. 
  249.  
  250.  
  251. ΓòÉΓòÉΓòÉ 9. Notices ΓòÉΓòÉΓòÉ
  252.  
  253.  
  254. ΓòÉΓòÉΓòÉ 9.1. Copyright ΓòÉΓòÉΓòÉ
  255.  
  256. O2D.C Copyright (c) 1992 Bruce E. H╨ñgman. All Rights Reserved. Ver 1.1 921206 
  257.  
  258.  
  259. ΓòÉΓòÉΓòÉ 9.2. Ver 1.1 Updates ΓòÉΓòÉΓòÉ
  260.  
  261. This version corrects a fault found in code that restores the saved default 
  262. drive and current working directory. Thanks to Compuserve user 72360,471 for 
  263. finding and reporting this fault.  The fault occurred when O2D was invoked when 
  264. the current working directory was the root of any drive.  This error has been 
  265. corrected in the current version. 
  266.  
  267.  
  268. ΓòÉΓòÉΓòÉ 9.3. Author ΓòÉΓòÉΓòÉ
  269.  
  270.       Bruce E. H╨ñgman          Electronic Addresses:
  271.       629 South 24th St.           Compuserve 72050,1327
  272.       Arlington VA 22202-2525      Internet butch@glib.org
  273.  
  274.  
  275. About the Author 
  276.  
  277. The author is a systems programming professional with over 25 years of 
  278. programming experience.  He's a former US Air Force Technical Instructor, and 
  279. he taught at Lowry AFB in Denver CO, at the US Marine Corps Computer Sciences 
  280. School, Quantico VA, and also during evenings at Northern Virginia Community 
  281. College. 
  282.  
  283. He now works as a Senior Systems Engineer for Electronic Data Systems 
  284. Corporation, Government Services Division, Herndon VA, at a federal government 
  285. account. 
  286.  
  287. His central expertise is in IBM mainframe MVS systems, but he's also 
  288. experienced in IBM PC systems, operating systems, Windows, and common end user 
  289. utility development. Programming languages include assembler, PL1, COBOL, 
  290. FORTRAN, C, BASIC, and many lesser dialects. 
  291.  
  292. Bruce is active on Compuserve and Washington DC area computer BBSs and welcomes 
  293. questions from professional colleagues and other users. 
  294.  
  295.  
  296. ΓòÉΓòÉΓòÉ 9.4. License - End User ΓòÉΓòÉΓòÉ
  297.  
  298. You, the end user, can use this program without paying a fee. 
  299.  
  300. You, the end user and owners and operators of private and public computer 
  301. bulletin board (BBS) services, may also distribute the original O2D011.ZIP file 
  302. to anyone else, as long as the file is not altered in any way. Alterations to 
  303. the O2D011.ZIP file, including changes to the .ZIP comments that identify the 
  304. author, void your license to distribute the files.  The original O2D011.ZIP 
  305. file is identified by the PKUNZIP authentication messages. 
  306.  
  307. Commercial distributors of shareware may include the original O2D011.ZIP file 
  308. on their distribution diskettes only by obtaining a license to distribute from 
  309. the author. 
  310.  
  311.  
  312. ΓòÉΓòÉΓòÉ 9.5. Warranty: ΓòÉΓòÉΓòÉ
  313.  
  314. This program is provided as is, without any express or implied warranty, 
  315. including, but not limited to, the implied warranties of merchantability and 
  316. fitness for a particular purpose.  Some states do not allow the exclusion of 
  317. implied warranties, so the above exclusion may not apply to you.  This limited 
  318. warranty gives you specific legal rights, and you may also have other rights 
  319. which vary from state to state. 
  320.  
  321.  
  322. ΓòÉΓòÉΓòÉ 9.6. Source Code Availability ΓòÉΓòÉΓòÉ
  323.  
  324. Complete commented source code is available on request from the author for a 
  325. nominal fee to cover disk and shipping.